package com.project.homework4_8.service.impl;

import com.project.homework4_8.service.IService;

public class ServiceImpl implements IService {

    @Override
    public String run() {
        try{
            throw new ArrayIndexOutOfBoundsException();
        }catch (Exception e){
            return e.toString();
        }
    }

    @Override
    public String work() {
        try{
            throw new NullPointerException();
        }catch (Exception e){
            return e.toString();
        }
    }

    @Override
    public void sleep() {
        System.out.println("正确运行");
    }
}
